# 导包
import requests
#实例化session
session = requests.Session()
#使用session发送验证码请求
session.get("https://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify&type=user_reg&r=0.1783493367988095")
#使用session发送注册请求
resp = session.post("https://hmshop-test.itheima.net/Home/User/reg.html",
                    data={"scene":"1", "username":"15634457318","verify_code":"8888","password":"123456",
                          "password2": "123456", "invite": ""})
#打印注册结果
print(resp.json())